package com.cjs.gaiJinGongChangFangFa;

public interface Factory<T> {
	T newInstance();
}

class FactoryA implements Factory<Product>{
	public Product newInstance(){
		return new ProductA();
	}
}

class FactoryB implements Factory<Product>{
	public Product newInstance(){
		return new ProductB();
	}
}